/*
 *  Copyright 2004 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.persistence.core;

import com.blandware.atleap.common.util.PartialCollection;
import com.blandware.atleap.common.util.QueryInfo;
import com.blandware.atleap.model.core.ContentLocale;

/**
 * <p>DAO for content locale</p>
 * <p><a href="ContentLocaleDAO.java.html"><i>View Source</i></a></p>
 *
 * @author Andrey Grebnev <a href="mailto:andrey.grebnev@blandware.com">&lt;andrey.grebnev@blandware.com&gt;</a>
 * @author Sergey Zubtsovskiy <a href="mailto:sergey.zubtsovskiy@blandware.com">&lt;sergey.zubtsovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.12 $ $Date: 2006/08/03 10:07:36 $
 */
public interface ContentLocaleDAO extends DAO {

	// ~ CRUD Methods ================================================================

	/**
	 * Creates new content locale
	 *
	 * @param contentLocale Object that represents what locale must be created
	 */
	public void createContentLocale(ContentLocale contentLocale);

	/**
	 * Retrieves locale with specified identifier
	 *
	 * @param localeIdentifier Identifier to search by
	 * @return Content locale or null if no content locale with specified ID exists in database
	 */
	public ContentLocale retrieveContentLocale(String localeIdentifier);

	/**
	 * Updates content locale
	 *
	 * @param contentLocale Content locale to update
	 */
	public void updateContentLocale(ContentLocale contentLocale);

	/**
	 * Deletes content locale
	 *
	 * @param contentLocale Content locale to delete
	 */
	public void deleteContentLocale(ContentLocale contentLocale);

	// ~ Additional methods ================================================================

	/**
	 * Retrieves filtered/sorted collection of locales.
	 *
	 * @param queryInfo Object that contains information about how to filter and sort data
	 * @return Collection of locales
	 */
	public PartialCollection listContentLocales(QueryInfo queryInfo);

	// ~ Finders ================================================================

	/**
	 * Finds default content locale
	 *
	 * @return Default content locale or null if nothing was found
	 */
	public ContentLocale findDefaultContentLocale();

}
